package com.woniuxy.sale.entity.vo;

import com.woniuxy.model.entity.Goods;
import com.woniuxy.model.vo.GoodsVo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * <p>
 * 选货单项表;
 * </p>
 *
 * @author lio
 * @since 2023-09-07
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain=true)
public class SaleAddOrderItemVo implements Serializable {

    /**
     * id
     */
    private Integer id;

    /**
     * 选货总表id
     */
    private Integer sid;

    /**
     * 商品编号
     */
    private String goodsNumber;

    /**
     * 商品名
     */
    private String goodsName;

    /**
     * 物料
     */
    private String meteriType;

    /**
     * 品类
     */
    private String categoryType;

    /**
     * 成色
     */
    private String purity;

    /**
     * 重量
     */
    private BigDecimal weight;

    /**
     * 数量
     */
    private Integer count;

    /**
     * 单价
     */
    private BigDecimal unitPrice;

    /**
     * 状态(0新建，1充足，2已打包)
     */
    private String states;

    public SaleAddOrderItemVo(Goods goods, Integer count, String states){
        this.goodsNumber = goods.getGoodsNumber();
        this.goodsName = goods.getGoodsName();
        this.meteriType = goods.getMeteriType();
        this.categoryType = goods.getCategoryType();
        this.purity = goods.getPurity();
        this.weight = goods.getWeight();
        this.unitPrice = goods.getUnitPrice();
        this.count = count;
        this.states = states;
    }
}
